#include <bits/stdc++.h>
using namespace std;
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
using ll = long long;
void solve()
{
    ll n;
    cin >> n;
    ll a = 0, b = 0, c = 0, d = 0;
    bool f = 0;
    for (ll i = 1; i <= n; i++)
    {
        d += 2;
        if (i % 5 == 0)
        {
            a += 2;
            f = 1;
        }
        if (f && (i - 5) % 10 == 0)
        {
            b++;
        }
        if (i % 20 == 0)
        {
            d -= 2;
            c += 3;
        }
    }
    printf("%lld %lld %lld %lld", a , b, c, d);
}
int main()
{
    int t = 1;
    // cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
